package com.sirdc.modules.sys.service;

import com.sirdc.modules.core.dao.BaseDao;
import com.sirdc.modules.sys.base.StringPKService;
import com.sirdc.modules.sys.dao.DeptDao;
import com.sirdc.modules.sys.entity.SysDept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: ling
 * Date: 2019/7/9
 * Time: 17:46
 * To change this template use File | Settings | File Templates.
 * Description:
 */

@Service
public class DeptService extends StringPKService<SysDept> {

    @Autowired
    private DeptDao deptDao;

    @Override
    protected BaseDao<SysDept, String> getDao() {
        return this.deptDao;
    }

    public List<SysDept>queryDeptList(String deptRelation){
       return deptDao.queryDeptList(deptRelation);
   }
    public List<SysDept>queryByDeptLevel(int deptLevel){
        return deptDao.queryByDeptLevel(deptLevel);
    }
    public List<SysDept> getByName(String name) {
        return deptDao.getByName(name);
    }
}
